package InetProgram;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Ipv4 {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress address = InetAddress.getByName("TianYiLuo");
        System.out.println(address);
        String name = address.getHostName();
        System.out.println(name);
        String hostAddress = address.getHostAddress();
        System.out.println(hostAddress);
    }
}
